package com.gold.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.gold.exception.ServiceException;
import com.gold.model.User;
import com.gold.persist.UserMapper;
import com.gold.service.BaseService;
import com.gold.service.UserService;

@Service("userService")
public class UserServiceImpl  implements UserService{
	
	@Resource
	UserMapper userMapper;

	@Override
	public boolean delete(Integer modelPK) throws ServiceException {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	@Transactional
	public boolean save(User model) throws ServiceException {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public User load(Integer modelPK) throws ServiceException {
		// TODO Auto-generated method stub
		return userMapper.selectByPrimaryKey(modelPK);
	}

	@Override
	public List<User> findAll() throws ServiceException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int countAll() throws ServiceException {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public boolean update(User model) throws ServiceException {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public User selectByName(String name, String password) {
		User user=userMapper.selectByName(name, password);
		return user;
	}

	
}
